'use strict';

import React, {Component, PropTypes} from 'react';
import {Grid, Col} from 'amazeui-react';
import Tag from './tag';
import {IMG} from '../res';

let colProps = {
	style: {
		width: '22%',
		float: 'left',
		marginLeft: '4%'
	}
};

export default class TagGroup extends Component {
	/*
	 * 构造函数。
	 *
	 * @param props 只读属性
	 */
	constructor(props) {
		super(props);
		this.state = {};
	}

	/*
	 * 渲染视图。
	 */
	render() {
		return (
			<Grid 
				className="am-cf am-margin-vertical"
			>
				<Col 
					{...colProps}
					className="am-margin-0"
				>
					<Tag 
						title="督学个人工作计划提交"
						content={this.props.data[0]}
						color="#0e90d2"
						logo={IMG.plan}
					/>
				</Col>
				<Col {...colProps}>
					<Tag 
						title="随访记录提交"
						content={this.props.data[1]}
						color="#42cac0"
						logo={IMG.visit}
					/>
				</Col>
				<Col {...colProps}>
					<Tag 
						title="整改通知提交"
						content={this.props.data[2]}
						color="#f8d347"
						logo={IMG.notice}
					/>
				</Col>
				<Col {...colProps}>
					<Tag 
						title="情况通报"
						content={this.props.data[3]}
						color="#ff6c60"
						logo={IMG.situation}
					/>
				</Col>
			</Grid>
		);
	}
}

TagGroup.propTypes = {
	data: PropTypes.array
};
TagGroup.defaultProps = {
	data: ['','','','']
};
